<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@page import="test.*"%>

<%@page import="java.sql.*"%>

<%@page import="java.util.*"%>

<%@page import = "java.util.Date" %>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="main.css"></link>
<title>Save Participant Information</title>
</head>
<body>
<div id="header">
<div style="float: left"><img height="75px" width="165px"
	alt="IMAGE" src="./Img/banner1.jpg" /> <img height="75px" width="165px"
	alt="IMAGE" src="./Img/banner2.jpg" /> <img height="75px" width="165px"
	alt="IMAGE" src="./Img/banner3.jpg" /> <img height="75px" width="160px"
	alt="IMAGE" src="./Img/banner5.jpg" /> <img height="75px" width="160px"
	alt="IMAGE" src="./Img/banner4.jpg" /> <img height="75px" width="162px"
	alt="IMAGE" src="./Img/banner7.jpg" /></div>

</div>
<div id="main">
<div id="main-left">
<div id="links">
<a id = "link1" href ="Home.jsp"> Home </a>
 <br/>
 <br/>
 <a id = "link2" href = "viewConferences.jsp"> View Conference</a>
  <br/>
 <br/>
 <a id = "link3" href = "RegisterConference.jsp"> Register for Conference</a>
  <br/>
 <br/>
 <a id = "link4" href = "ListOfAttendees.jsp"> List of Attendees</a>
  <br/>
 <br/>
 <a id = "link5" href = "PresentWorkshop.jsp">Submit Proposal</a>
  <br/>
 <br/>
 <a id = "link6" href = "Admin.jsp">Administrator</a>
</div>
</div>
<div id="main-right">
<h1 id="title"><em>Tutor/Mentor Leadership And Networking
Conference</em></h1>
<div class="myProfile">
<%
	String fName = request.getParameter("FName");
	String lName = request.getParameter("LName");
	String title = request.getParameter("Title");
	String organization = request.getParameter("Organization");
	String address = request.getParameter("Address");
	String city = request.getParameter("City");
	String state = request.getParameter("State");
	String zip = request.getParameter("Zipcode");
	int zipCode = Integer.parseInt(zip);
	System.out.println(zipCode);
	String country = request.getParameter("Country");
	String phone = request.getParameter("Phone");
	String fax = request.getParameter("Fax");
	String email = request.getParameter("Email");
	String partOf = request.getParameter("PartOf");
	String conference = request.getParameter("Conference_list");
	int confid = Integer.parseInt(conference);
	String lunch = null, attendeeList = null;
	if(request.getParameter("lunchOption")!= null)
	{
		lunch = request.getParameter("lunchOption");
		
	}
	if(request.getParameter("attendeeList")!= null)
	{
		attendeeList = request.getParameter("attendeeList");
	}
	String attendingOn = request.getParameter("confDays");
	System.out.println(attendingOn);
	String AttendingDate = null;
	if(attendingOn.trim().equalsIgnoreCase("One"))
	{
		 AttendingDate = request.getParameter("date");
		 System.out.println(AttendingDate);
	}
	PaticipantDataAccess p = new PaticipantDataAccess();

	int participationId = p.saveParticipantDetails(fName,lName,title,organization,address,city,state,zipCode,country,phone,fax, email,partOf);
	System.out.println(participationId);
	
	int registrationId = p.saveRegistrationDetails(participationId,confid,lunch,attendeeList);
	System.out.println(registrationId);
	
	 p.saveAttendOnDetails(registrationId,confid,attendingOn,AttendingDate);
	
%>
<h4> Thank you for registering for the conference.
 We look forward to meeting you on the day of the conference.</h4>
</div>
</div>
</div>
</body>
</html>